<?php

namespace App\Modules\Admin\Http\Controllers\Member;

use App\Modules\Admin\Http\Controllers\BaseController;
use App\Modules\Admin\Http\Requests\Water\ScoreRequest;
use App\Modules\Admin\Http\Requests\Water\UsersRequest;
use App\Modules\Admin\Services\Member\BuyScoreService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class BuyScoreController extends BaseController
{
    public function __construct(BuyScoreService $service)
    {
        $this->service = $service;
    }

    public function getScoreListDetails(Request $request): JsonResponse
    {
        $result = $this->service->getScoreListDetails($request);

        return $this->successJson($result, $this->service->getError());
    }
    public function getIntegraDetailList(Request $request): JsonResponse
    {
        $result = $this->service->getUsersIntegraDetailLists($request->all());

        return $this->successJson($result, $this->service->getError());
    }
    public function getBuyScoreListDetails(Request $request): JsonResponse
    {
        $result = $this->service->getBuyScoreListDetails($request->all());

        return $this->successJson($result, $this->service->getError());
    }
    public function create(ScoreRequest $request): JsonResponse
    {
        return $this->createService($request);
    }
}
